Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GI-14 Implement Auto-scroll for About Section When Clicked #62

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

jarenadams21
Copy link
Contributor

@jarenadams21 jarenadams21 commented Oct 19, 2023

ℹ️ Issue

Closes #55

📝 Description

Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.

Changed About.tsx:

  1. Created a ref (aboutSection) with useRef to reference the title paragraph in the component
  2. Implemented a generic executeScrollTo function which scrolls to the html element that triggered the function
  3. Uses window.ScrollTo using a top offset equal to the height of the navbar + another scroll offset of 20 to position it at the top of the white container for the About section

✔️ Verification

Before Click:
Screenshot 2023-10-19 at 5 50 44 PM

After Click:
Screenshot 2023-10-19 at 5 50 07 PM

🏕️ (Optional) Future Work / Notes

Seems fine,
Potential future work: Highlight or clickable pointer to indicate that this behavior exists without finding out by actually clicking.

Copy link
Contributor

@hams7504 hams7504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! one minor suggestion: could we change the cursor to indicate that the about title is clickable when the user hovers over it?

@JamesColesanti JamesColesanti merged commit 3ba7b0d into hm-initial-setup Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants